import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class NormalSwitch extends StatelessWidget {
  final bool isSelect;
  final String title;

  const NormalSwitch({Key key, this.isSelect, this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        Text(
          title,
          style: TextStyle(
            color: aceBlackColor,
            fontSize: getSp(16),
            fontWeight: FontWeight.w700,
            height: 14 / 16,
          ),
        ),
        SizedBox(
          width: getDp(18),
        ),
        IndexedStack(
          children: [
            SvgPicture.asset(
              A.assetsImagesStyleSwitchOn,
              width: getDp(49),
              height: getDp(24),
              fit: BoxFit.contain,
            ),
            SvgPicture.asset(
              A.assetsImagesStyleSwitchOff,
              width: getDp(49),
              height: getDp(24),
              fit: BoxFit.contain,
            ),
          ],
          index: isSelect ? 0 : 1,
        ),
      ],
    );
  }
}
